 <?
if (!defined('baseinfo')) {

    exitdata();
}   

?>
<div class="subB clTxt1 fs05 clBg4">
    <div class="wrpSubB mainSB">
        <div class="ttlB cutTxt">Site Map</div>
    </div>
</div>

<div class="wrpSiteMap fs03">
    <div class="wrpInSiteMap clBg4">
        <ul class="siteMap1">
            <li>
                <a href="<?=baseinfo?>/home">Home</a>
                <ul class="siteMap2">
                    <li>
                        <a href="javascript:void(0)">Account</a>
                        <ul class="siteMap3">
                             <?if(count($data['user'])==0){?>
                             <li>
                             <a href="<?=baseinfo?>/login">Login</a>
                             
                             </li>
                             <li>
                             <a href="<?=baseinfo?>/signup">Sign Up</a>
                             
                             </li>
                             <?}else {?>
                             
                            <li>
                                <a href="<?=baseinfo.'/'.$data['user']['username']?>">Profile</a>
                                <ul class="siteMap4">
                                    <li>
                                        <a href="<?=baseinfo?>/setting">Setting</a>
                                        <ul class="siteMap5">
                                            <li><a href="<?=baseinfo?>/setting">Profile Setting</a></li>
                       
                                            <li><a href="<?=baseinfo?>/setting?pageselect=Account">Account Setting</a></li>
                                   
                                            <li><a href="<?=baseinfo?>/setting?pageselect=Privacy">Privacy Setting</a></li>
                                             <? if(NameDmconnex=="Canonlife"||NameDmconnex=="Infostant"){?>
                                            <li><a href="<?=baseinfo?>/setting?pageselect=Serial">Serial Setting</a></li>
                                            <?}?>
                                            <? if(NameDmconnex=="BCAZ"||NameDmconnex=="Infostant"||NameDmconnex=="Bangpan"){?>
                                             <li><a href="<?=baseinfo?>/setting?pageselect=Publication">Publication Setting</a></li>
                                             <?}?>
                                          
                                          </ul>
                                    </li>
                                    
                                    
                                    <li><a href="<?=baseinfo.'/'.$data['user']['username']?>?myfeed=1">News Feed</a></li>
                                    <li><a href="<?=baseinfo.'/'.$data['user']['username'].'/favorites'?>">Bookmark</a></li>
                                    <? if (NearByCheck!=0) {?>
                                    <li><a href="<?=baseinfo.'/nearby'?>">Post</a></li>
                                    <?}?>
                                    <?if(NameDmconnex=="Infostant"){?>
                                    <li><a href="<?=baseinfo.'/cart'?>">Cart</a></li>
                                    <?}?>
                                    <?if($data['user']['roleid']==3){?>
                                    <li><a href="<?=baseinfo.'/dmmanager'?>">Management</a></li>
                                    <?}?>
                                    <?if(NameDmconnex=="Infostant"){?>
                                    <li><a href="<?=baseinfo.'/game'?>">Gamification</a></li>
                                    <?}?>
                                </ul>
                            </li>
                            
                            <?}?>
                            
                       <!--     <li><a href="">Bookmark</a></li>
                            <li>
                                <a href="">Follow</a>
                                <ul class="siteMap4">
                                    <li><a href="">Followers</a></li>
                                    <li><a href="">Following</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="">Message</a>
                                <ul class="siteMap4">
                                    <li><a href="">Followers</a></li>
                                    <li><a href="">Following</a></li>
                                    <li><a href="">Others</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="">Friends Suggestion</a>
                                <ul class="siteMap4">
                                    <li><a href="">Friends Suggestion</a></li>
                                    <li><a href="">Facebook Friend</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="/setting">Settings</a>
                                <ul class="siteMap4">
                                    <li><a href="/setting">Profile Setting</a></li>
                                    <li><a href="/setting">Account Setting</a></li>
                                    <li><a href="/setting">Privacy Setting</a></li>
                                    <li><a href="/setting">Serial</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="">Log In</a>
                                <ul class="siteMap4">
                                    <li><a href="">Log In via Username and Password</a></li>
                                    <li><a href="">Log In via Facebook</a></li>
                                    <li><a href="">Forgot Password</a></li>
                                </ul>
                            </li>-->
                        </ul>
                    </li>
                    <?  if(count($data['user'])!=0){
             if (defined('NewFeedCheck')) {?>
                    <li><a href="<?=baseinfo.'/'.$data['user']['username']?>?myfeed=1">News Feed</a></li>
             <?}
             
                    }
             ?>
                    <li>
                        <a href="">Menu</a>
                        <ul class="siteMap3">
<!--                            <li><a href="/recommend">Recommend</a></li>
                            <li><a href="/photogallery">Photo</a></li>
                            <li><a href="/vdo">VDO</a></li>
                            <li><a href="/article">Article</a></li>
                            <li><a href="/activity">Activity</a></li>
                            <li><a href="/bookstore">Bookstore</a></li>
                            <li><a href="/news">News</a></li>
                            <li><a href="/canonlifenetwork">Life Club</a></li>
                            <li><a href="/home">Everything</a></li>-->
                            
                            
                             <?
                     $class="tabSbActived";
                     
                     ?>
                     <?if(NameDmconnex!="Canonlife"){?>
                    <li ><a  href="<?=baseinfo.'/home'?>" data-href="Everything">Everything</a></li>
                    <?}?>
                     <?
                     if(count($data['feature']))
                     {
                      foreach($data['feature'] as $valuefeature)
                      {
                       if($valuefeature['show'])
                       {
                         if($valuefeature['isexternal'])
                       {
                     ?>
                     <li ><a  href="<?=$valuefeature['link']?>" data-href="<?=$valuefeature['link']?>"><?=ucfirst($valuefeature['name'])?></a></li>
                     
                    <?
                       }              
                       else    if($valuefeature['fid'])
                       {
                     ?>
                     <li ><a  href="<?=baseinfo.'/'.$valuefeature['link']?>" data-href="<?=$valuefeature['link']?>"><?=ucfirst($valuefeature['name'])?></a></li>
                     
                    <?
                       }else if($valuefeature['isiframe'])
                       {
                      ?> 
                       <li ><a  href="<?=baseinfo.'/'.$valuefeature['link']?>" data-href="<?=$valuefeature['link']?>"><?=ucfirst($valuefeature['name'])?></a></li>
                     <?  
                       }else if($valuefeature['islink'])
                       {
                      ?> 
                       <li><a  href="<?=baseinfo.'/'.$valuefeature['link']?>" data-href="<?=$valuefeature['link']?>"><?=ucfirst($valuefeature['name'])?></a></li>
                     <?  
                       }else
                       {
                       ?>
                      <li><a  href="<?=baseinfo.'/'.$valuefeature['link']?>" data-href="<?=$valuefeature['link']?>"><?=ucfirst($valuefeature['name'])?></a></li> 
                       <?
                       
                       }
                       }
                      }
                     }
                    
                    ?>   
                    
                    <?if(NameDmconnex=="Canonlife"){?>
                    <li ><a  href="<?=baseinfo.'/home'?>" data-href="Everything">Everything</a></li>
                    <?}?>        
                    
                     <?if(NameDmconnex=="Japan Town"){?>
                    <li ><a  target="_blank" href="https://itunes.apple.com/us/app/tpa-bookshelf/id698106889?mt=8" data-href="Everything">Book Store</a></li>
                    <?}?>      
                    
                    
                     <?if(NameDmconnex=="KhonKaenUniversity"){?>
                    <li ><a  target="_blank" href="http://library.kku.ac.th" data-href="Everything">Library</a></li>
                    <?}?>          
                           
                            
                            
                        </ul>
                    </li>
                    <li>
                        <a href="">Upload</a>
                        <ul class="siteMap3">
                            <li><a href="/photogallery/add">Upload Photo</a></li>
                            <li><a href="/vdo/add">Upload VDO</a></li>
                            <li><a href="/article/add">Upload Article</a></li>
                            
                            
                               <?
                     if(count($data['feature']))
                     {
                      foreach($data['feature'] as $valuefeature)
                      {
                      
                       if(!is_array($valuefeature['showwrite']))
                         {
                         $valuefeature['showwrite']=array();
                         }
                      
                      if(@array_search($data['user']['roleid'],$valuefeature['showwrite'])!==false)
                      {
                      ?>
                        <li><a  href="<?=baseinfo.'/'.$valuefeature['link'].'/add'?>" data-href="<?=$valuefeature['link']?>">Upload <?=$valuefeature['name']?></a></li>
                      <?
                      
                      }
                      else if($valuefeature['showadd']==1&&$valuefeature['isiframe']!=1||($valuefeature['showadd']==$data['user']['roleid']))
                      {
                       
                     ?>
                        <li><a  href="<?=baseinfo.'/'.$valuefeature['link'].'/add'?>" data-href="<?=$valuefeature['link']?>">Upload <?=$valuefeature['name']?></a></li>
                      <?
                      }
                      }
                     }
                    
                    ?>                  
                            
                            
                            
                        </ul>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
</div>